package cc.xsubj.trading.tests;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import cc.xsubj.engine.Globals;
import cc.xsubj.engine.ResourceManager;

import org.lwjgl.opengl.Display;
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;
import org.newdawn.slick.state.transition.FadeInTransition;
import org.newdawn.slick.state.transition.FadeOutTransition;
import org.newdawn.slick.tests.TransitionTest;

import cc.xsubj.trading.world.GrassWorld;
import cc.xsubj.trading.world.InventoryWorld;


public class InventoryTest extends StateBasedGame {

	private InventoryTest(String name) {
		super(name);
	}
	
	@Override
	public void initStatesList(GameContainer container) throws SlickException {
		
		try {
			ResourceManager.loadResources("data/resources.xml");
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		
		addState(new InventoryWorld(1, container));
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			
			AppGameContainer container = new AppGameContainer(new InventoryTest("Inventory Test"));
			container.setDisplayMode(800, 600, false);
			container.setTargetFrameRate(60);
			container.setMultiSample(0);
			Globals.scaleX = 2;
			Globals.scaleY = 2;
			Globals.debugEnabled = true;
			container.start();
			
		} catch (SlickException e) {
			e.printStackTrace();
		}

	}

}
